{extend name="admin@public:base" /}
{block name="main-row-content"}
<div class="page-header">
	<h1>
		当前操作
		<small>
			<i class="ace-icon fa fa-angle-double-right"></i>
			添加管理员
		</small>
	</h1>
</div><!-- /.page-header -->
<div class="row">
	<div class="col-xs-12">
		<!-- PAGE CONTENT BEGINS -->
		<form class="form-horizontal ajaxForm2" action="{:url('admin/Sys/admin_runedit')}" method="post">
		    <input type="hidden" name="id" value="{$admin.id}">
		    <div class="form-group">
				<label class="col-sm-2 control-label no-padding-right" for="form-field-2">所属角色：</label>

				<div class="col-sm-10">
				   <select name="group_id" class="col-xs-10 col-sm-4" required >
                        <option value="0">--请选择--</option>
                        {foreach name="role" item="vo"}
                        <option value="{$vo.id}" {if condition="$vo.id eq $group_id"} selected {/if}>{$vo.title}</option>
                        {/foreach}
                    </select>
                    <div class="col-sm-5 help-block"><i class="fa fa-info-circle color-info1"></i> 必填</div>
				</div>
			</div>

			<div class="space-4"></div>
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-right" for="form-field-1">用户名：</label>
				<div class="col-sm-10">
					<input type="text"  name="username" value="{$admin.username}" placeholder="用户名" class="col-xs-4" required/>
					<div class="col-sm-5 help-block"><i class="fa fa-info-circle color-info1"></i> 必填（由字母数字组成）</div>
				</div>
			</div>
			<div class="space-4"></div>
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-right" for="form-field-1">真实姓名：</label>
				<div class="col-sm-10">
					<input type="text"  value="{$admin.truename}" name="truename" placeholder="真实姓名" class="col-xs-6" required/>
					<div class="col-sm-5 help-block"><i class="fa fa-info-circle color-info1"></i> 必填（真实姓名）</div>
				</div>
			</div>
			<div class="space-4"></div>
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-right" for="form-field-1"><span class="middle red">*</span>登陆密码：</label>
				<div class="col-sm-10">
					<input type="text"  name="password" autocomplete="off" placeholder="密码" class="col-xs-4" onfocus="this.type='password';" />
					<div class="col-sm-5 help-block"><i class="fa fa-info-circle color-info1"></i>密码为空表示不修改</div>
				</div>
			</div>
            <div class="space-4"></div>
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 性别：  </label>
				<div class="col-sm-10">
					<label>
						<input name="sex" type="radio" value="1" {$admin.sex?'checked':''} class="ace">
						<span class="lbl"> 男 </span>&nbsp;&nbsp;
					</label>
					<label>
						<input name="sex" type="radio" {$admin.sex?'':'checked'}  value="0" class="ace">
						<span class="lbl"> 女 </span>
					</label>
				</div>
			</div>
            <div class="space-4"></div>
            <div class="form-group">
				<label class="col-sm-2 control-label no-padding-right" for="form-field-1">电话：</label>
				<div class="col-sm-10">
					<input type="text"  value="{$admin.tel}" name="tel" placeholder="电话" class="col-xs-6" required/>
				</div>
			</div>
			<div class="space-4"></div>
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-right" for="form-field-2">邮箱：</label>

				<div class="col-sm-10">
					<input type="text"  value="{$admin.email}" name="email" placeholder="邮箱" class="col-xs-10 col-sm-6" required />
				</div>
			</div>
			<div class="space-4"></div>
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-right" for="form-field-1">头像：</label>
				<div class="col-sm-10">
				    <div class="col-sm-2">
						<a href="javascript:;" class="file">
							<input name="avatar" id="img_upload" type="file">
							<i class="fa fa-cloud-upload "></i>上传头像
						</a>
					</div>
					<div class="col-sm-10 help-block"><i class="fa fa-info-circle color-info1"></i> 用于用户头像</div>
					<div class="file_img_show col-sm-12">
					    <div class="img col-xs-2" id="show_upload_img">
					      <i class="ace-icon fa fa-times red remove_upload_img"></i>
					      <img src="{$admin.avatar|get_img}" alt="">
					    </div>
					</div>
				</div>
			</div>
			<div class="space-4"></div> 
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 状态： </label>
				<div class="col-sm-10" style="padding-top:5px;">
					<input name="status" value="1" {$admin.status?"checked":""} class="ace ace-switch ace-switch-6" type="checkbox">
					<span class="lbl">&nbsp;&nbsp;默认关闭</span>
				</div>
			</div>
			<div class="space-4"></div>
			<div class="clearfix">
				<div class="col-md-offset-3 col-md-9 ">
					<button class="btn btn-info btn-sm btn-radius" type="submit">
						<i class="ace-icon fa fa-check bigger-110"></i>
						提交并保存
					</button>

					&nbsp; &nbsp; &nbsp;
					<button class="btn btn-success btn-sm btn-radius" type="submit">
						<i class="ace-icon fa fa-undo bigger-110"></i>
						重置
					</button>
				</div>
			</div>

			
		</form>
	</div><!-- /.col -->
</div><!-- /.row -->
{/block}